package com.stenio.fancat.service.enums;

/**
 * @author zhangqiu
 * @date 2018/12/5
 * @desc
 **/
public enum OrderType {
    WARE(1,"兑换商城订单"),
    LOTERRY(2,"抽奖商品订单"),
    REDPACK(3,"红包订单"),
    WAREFLEA(4,"二手交易订单");

    private int status;
    private String desc;
    OrderType(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public static OrderType getEnumByStatus(Integer i){
        for(OrderType status:OrderType.values()){
            if(status.getStatus()==i){
                return status;
            }
        }
        return null;
    }
}
